0d7af8c708cdda67c64cdc2279006ae8972b5f7e,rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java,RMTxStore,createStatements,#,914

Before Change



    private void createStatements() throws SQLException {
        // create the statements in advance to avoid synchronization later 
        createDestSequenceStmt = connection.prepareStatement(CREATE_DEST_SEQUENCE_STMT_STR);
        createSrcSequenceStmt = connection.prepareStatement(CREATE_SRC_SEQUENCE_STMT_STR);
        deleteDestSequenceStmt = connection.prepareStatement(DELETE_DEST_SEQUENCE_STMT_STR);
        deleteSrcSequenceStmt = connection.prepareStatement(DELETE_SRC_SEQUENCE_STMT_STR);
        updateDestSequenceStmt = connection.prepareStatement(UPDATE_DEST_SEQUENCE_STMT_STR);

After Change


    }
    
    private void cacheStatements() throws SQLException {
        if (connection == null) {
            // if the connection is not held, no statement is cached.
            return;
        }
        // create a statement specific lock table
        statementLocks = new HashMap<Statement, Lock>();
        cachedStatements = new HashMap<String, PreparedStatement>();
        
        // create the statements in advance if the connection is to be kept 
        cacheStatement(connection, CREATE_DEST_SEQUENCE_STMT_STR);
        cacheStatement(connection, CREATE_SRC_SEQUENCE_STMT_STR);
        cacheStatement(connection, DELETE_DEST_SEQUENCE_STMT_STR);
        cacheStatement(connection, DELETE_SRC_SEQUENCE_STMT_STR);
        cacheStatement(connection, UPDATE_DEST_SEQUENCE_STMT_STR);
        cacheStatement(connection, UPDATE_SRC_SEQUENCE_STMT_STR);
        cacheStatement(connection, SELECT_DEST_SEQUENCES_STMT_STR);
        cacheStatement(connection, SELECT_SRC_SEQUENCES_STMT_STR);
        cacheStatement(connection, SELECT_DEST_SEQUENCE_STMT_STR);
        cacheStatement(connection, SELECT_SRC_SEQUENCE_STMT_STR);
        cacheStatement(connection, CREATE_INBOUND_MESSAGE_STMT_STR);
        cacheStatement(connection, CREATE_OUTBOUND_MESSAGE_STMT_STR);
        cacheStatement(connection, DELETE_INBOUND_MESSAGE_STMT_STR);
        cacheStatement(connection, DELETE_OUTBOUND_MESSAGE_STMT_STR);
        cacheStatement(connection, SELECT_INBOUND_MESSAGES_STMT_STR);
        cacheStatement(connection, SELECT_OUTBOUND_MESSAGES_STMT_STR);
    }

    public synchronized void init() {